package com.koron.device.bean.bo;

import com.koron.bean.standard.deviceClasssify.po.Type;
import com.koron.device.bean.TGParams;
import lombok.Data;

import java.util.List;
import java.util.stream.Collectors;

@Data
public class TypeParamCompose extends Type {

    // 基本参数集合
    private List<TGParams> tgplist;

    // 技术参数集合
    private List<TypeParamsJs> tpjslist;

    // 基础参数名
    private List<String> tgpName;

    // 技术参数名
    private List<String> tpjsName;

    public void setTgplist(List<TGParams> tgplist) {
        this.tgplist = tgplist;
        this.tgpName = tgplist.stream().map(TGParams::getParamName).distinct().collect(Collectors.toList());
    }

    public void setTpjslist(List<TypeParamsJs> tpjslist) {
        this.tpjslist = tpjslist;
        this.tpjsName = tpjslist.stream().map(TypeParamsJs::getParamName).distinct().collect(Collectors.toList());
    }
}
